package cn.smartopen.aispace.config;


import org.springframework.beans.factory.annotation.Autowired;  
import org.springframework.context.annotation.Configuration;  
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;  
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import cn.smartopen.aispace.interceptor.LoginInterceptor;  
  
@Configuration  
public class WebConfig implements WebMvcConfigurer {  
  
    @Autowired  
    private LoginInterceptor loginInterceptor;  
  
    @Override  
    public void addInterceptors(InterceptorRegistry registry) {  
        // 添加拦截器，并设置拦截路径和排除路径  
        // registry.addInterceptor(loginInterceptor)  
        //         .addPathPatterns("/**") // 拦截所有请求  
        //         .excludePathPatterns("/appid/login","/appid/randomstr","/zerosys/login"); // 排除不需要拦截的路径  
    }  
}